package Action;

import java.util.List;

import com.opensymphony.xwork2.ActionContext;

import Model.user;
import Service.adminService;
/**
 * 管理员查看用户类
 * @author MacBook
 *
 */
public class UserListAction {
	//返回用户列表
	private List list;
	
	public List getList() {
		return list;
	}
	public void setList(List list) {
		this.list = list;
	}
	//请求userlist方法
	public String getUserlist(){
		Object obj = ActionContext.getContext().getSession().get("user");
		user u = (user)obj;
		if(!u.getPower().equals("admin"))
			return "error";
		adminService userList = new adminService();
		list = userList.UserListService();
		return "success";
	}
}
